package com.csgc.camera.http.api

import com.csgc.camera.bean.AppInitInfo
import com.csgc.camera.bean.BindPhoneParams
import com.csgc.camera.bean.CodeLoginParams
import com.csgc.camera.bean.FeedBackParams
import com.csgc.camera.bean.InitParams
import com.csgc.camera.bean.OaidParams
import com.csgc.camera.bean.SendCodeParams
import com.csgc.camera.bean.UserInfo
import com.csgc.camera.bean.UserInfoParams
import com.csgc.camera.bean.VipPayParams
import com.csgc.camera.bean.VipType
import com.csgc.camera.bean.VipTypeParams
import com.csgc.camera.bean.WxBindParams
import com.csgc.camera.bean.WxLoginParams
import com.csgc.camera.bean.WxPayInfoData
import com.csgc.camera.http.BaseResponse
import retrofit2.http.Body
import retrofit2.http.POST

interface AppApi {

    //验证码登录
    @POST("/app/phone/login")
    suspend fun loginByCode(@Body params: CodeLoginParams): BaseResponse<UserInfo>

    //获取用户信息
    @POST("/app/phone/getinfo")
    suspend fun getUserInfo(@Body params: UserInfoParams): BaseResponse<UserInfo>

    //注销用户
    @POST("/app/phone/logoff")
    suspend fun cleanUserInfo(@Body params: UserInfoParams): BaseResponse<Any>

    //发送验证码
    @POST("/app/phone/send")
    suspend fun sendSmsCode(@Body params: SendCodeParams): BaseResponse<Any>

    //vip购买类型列表
    @POST("/pay/product/get")
    suspend fun getVipTypeList(@Body params: VipTypeParams): BaseResponse<List<VipType>>

    //支付宝支付
    @POST("https://pay.fruitgoodapp.com/app/alipay/trade/page/pay")
    suspend fun getAliPayInfo(@Body params: VipPayParams): BaseResponse<String>

    //微信支付
    @POST("https://pay.fruitgoodapp.com/app/wxpay/trade/page/pay")
    suspend fun getWxPayInfo(@Body params: VipPayParams): BaseResponse<WxPayInfoData>

    //用户反馈
    @POST("/app/suggest/add")
    suspend fun submitFeedBack(@Body params: FeedBackParams): BaseResponse<Any>

    //微信登录
    @POST("/app/weixin/login")
    suspend fun loginByWx(@Body params: WxLoginParams): BaseResponse<UserInfo>

    //微信绑定
    @POST("/app/weixin/bindweixin")
    suspend fun bindWx(@Body params: WxBindParams): BaseResponse<UserInfo>

    //手机号绑定
    @POST("/app/weixin/bindphone")
    suspend fun bindPhone(@Body params: BindPhoneParams): BaseResponse<UserInfo>

}